//
//  Matrix.cpp
//  learnC++
//
//  Created by liuzhibing on 2018/6/6.
//  Copyright © 2018年 yunfan.com. All rights reserved.
//

#include "Matrix.hpp"

Matrix4x4::Matrix4x4(){
    for (int row=0; row < 4; ++row)
        for (int col=0; col < 4; ++col)
            m_data[row][col] = 0.0;
}

double& Matrix4x4::operator()(int row, int col){
    
    assert(col >= 0 && col < 4);
    assert(row >= 0 && row < 4);
    
    return m_data[row][col];
}

const double& Matrix4x4::operator()(int row,int col)const{
    assert(col >= 0 && col < 4);
    assert(row >= 0 && row < 4);
    
    return m_data[row][col];
}
